package com.zhuiyun.project.util;

import org.springframework.security.core.context.SecurityContextHolder;


/**
 * @auther zcy
 * @data 2020/6/18 17:12
 */

public class UserUtils {


    /**
     *
     * 获取当前登录用户 放入缓存中
     * @return
     */
    public static Object getUser(){
        Object user = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
//        SysUser sysuser = new SysUser();
//        sysuser.setUserName("pcAdmin");
        return user;
    }

}
